// Copyright (c) MatrixFramework. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

using Microsoft.Extensions.DependencyInjection;
using PhotoGalleryService.Domain;
using System;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.Modularity;

namespace PhotoGalleryService.EntityFrameworkCore;

/// <summary>
/// PhotoGallery服务EntityFrameworkCore模块
/// </summary>
[DependsOn(
    typeof(PhotoGalleryServiceDomainModule)
)]
public class PhotoGalleryServiceEntityFrameworkCoreModule : AbpModule
{
    public override void ConfigureServices(ServiceConfigurationContext context)
    {
        context.Services.AddAbpDbContext<PhotoGalleryServiceDbContext>(options =>
        {
            options.AddDefaultRepositories(includeAllEntities: true);
        });

        // 数据库配置将在Host层进行
    }
}